package cn.hchaojie.camp.javafx.controls;

import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;

public class Contact {
	private String name;
	private String phone;
	private String note;
	
	private StringProperty notes = new SimpleStringProperty();
	
	public Contact(String name, String phone, String note) {
		this.name = name;
		this.phone = phone;
		this.note = note;
		this.notes.set(note);
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getNote() {
		return note;
	}


	public void setNote(String note) {
		this.note = note;
		this.notes.set(note);
	}
	
	public String getNotes() {
		return notes.get();
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("Contact [name=");
		builder.append(name);
		builder.append(", phone=");
		builder.append(phone);
		builder.append(", note=");
		builder.append(note);
		builder.append("]");
		return builder.toString();
	}
}
